package com.southminority.ethnic.service.user;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.southminority.ethnic.controller.user.vo.UserVO;
import com.southminority.ethnic.pojo.User;
import com.baomidou.mybatisplus.extension.service.IService;

/**
* @author ASHTR
* @description 针对表【user(用户表)】的数据库操作Service
* @createDate 2025-08-29 13:46:29
*/
public interface UserService extends IService<User> {
    //用户登录

    //用户注册

    //获取邮箱验证码
    Boolean getYzm(String email);

    Boolean logon(String email, String password,String passwordAgain,String username,String code);

    User login(String email, String password);

    //忘记密码验证码
    Boolean forgetYZM(String email);

    //忘记密码-》修改密码
    Boolean forget(String email,String password,String code);

    //根据旧密码去修改新密码
    Boolean updatePasswordFromOldPassword(String oldPassword, String newPassword);

    //退出登录
    Boolean logout(String token);

    String checkToken(String token);

    //根据token获取用户信息
    User getUserByToken(String token);

    //--------------  vip管理员-----------------------------------------------------------------------------------------------------
    Page<User> getUserPage(Integer pageNum, Integer pageSize, String keyword, Integer userType);
    Boolean updateUser(Long id, Integer newUserType);
    Boolean initPassword(Long id);

}
